/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author kenny
 */
@Embeddable
public class SalonxrecursoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "nSlnId")
    private int nSlnId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "nRcrId")
    private int nRcrId;

    public SalonxrecursoPK() {
    }

    public SalonxrecursoPK(int nSlnId, int nRcrId) {
        this.nSlnId = nSlnId;
        this.nRcrId = nRcrId;
    }

    public int getNSlnId() {
        return nSlnId;
    }

    public void setNSlnId(int nSlnId) {
        this.nSlnId = nSlnId;
    }

    public int getNRcrId() {
        return nRcrId;
    }

    public void setNRcrId(int nRcrId) {
        this.nRcrId = nRcrId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nSlnId;
        hash += (int) nRcrId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SalonxrecursoPK)) {
            return false;
        }
        SalonxrecursoPK other = (SalonxrecursoPK) object;
        if (this.nSlnId != other.nSlnId) {
            return false;
        }
        if (this.nRcrId != other.nRcrId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.SalonxrecursoPK[ nSlnId=" + nSlnId + ", nRcrId=" + nRcrId + " ]";
    }
    
}
